package com.hxkj.dao.impl;

import com.hxkj.dao.AdvertisementColumnDao;
import com.hxkj.domain.po.Advertisement;
import com.hxkj.mapper.AdvertisementColumnMapper;
import com.hxkj.domain.po.AdvertisementColumn;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;


/**
* 数据操作实现
*
* @author: chenwei
* @version: 1.0
* @datetime: 2018-09-07 15:29:11
*
*/
@Service("advertisementColumnDao")
public class AdvertisementColumnDaoImpl implements AdvertisementColumnDao {

    @Resource
    private AdvertisementColumnMapper advertisementColumnMapper;

    @Override
    public AdvertisementColumn get(Long columnId) {
        return advertisementColumnMapper.selectByPrimaryKey(columnId);
    }

    @Override
    public List<AdvertisementColumn> get(AdvertisementColumn advertisementColumn) {
        return advertisementColumnMapper.select(advertisementColumn);
    }

    @Override
    public int delete(Long columnId) {
        return advertisementColumnMapper.deleteByPrimaryKey(columnId);
    }

    @Override
    public int delete(AdvertisementColumn advertisementColumn) {
        return advertisementColumnMapper.delete(advertisementColumn);
    }

    @Override
    public int save(AdvertisementColumn advertisementColumn) {
        return advertisementColumnMapper.insert(advertisementColumn);
    }

    @Override
    public int update(AdvertisementColumn advertisementColumn) {
        return advertisementColumnMapper.update(advertisementColumn);
    }

    @Override
    public List<AdvertisementColumn> checkRepeat(AdvertisementColumn advertisementColumn) {
        return advertisementColumnMapper.checkRepeat(advertisementColumn);
    }

}
